
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    {% block title %}{% endblock %}
    {% block css %}{% endblock %}

</head>

<body>
    <div id="container" class="effect aside-float aside-bright mainnav-lg">

        <header id="navbar">
            <div id="navbar-container" class="boxed">

                <div class="navbar-header">
                    <a href="/" class="navbar-brand">
                        <img src="/static/img/logo.png" alt="Nifty Logo" class="brand-icon">
                        <div class="brand-title">
                            <span class="brand-text">CMDB System</span>
                        </div>
                    </a>
                </div>



                <div class="navbar-content clearfix">
                    <ul class="nav navbar-top-links">


                        <li class="tgl-menu-btn">
                            <a class="mainnav-toggle" href="#">
                                <i class="pli-list-view icon-lg"></i>
                            </a>
                        </li>






                    </ul>
                    <ul class="nav navbar-top-links">

                        <li id="dropdown-user" class="dropdown">
                            <a href="#" data-toggle="dropdown" class="dropdown-toggle text-right">
                                <span class="ic-user pull-right">
                                    <i class="pli-male"></i>
                                </span>

                            </a>


                            <div class="dropdown-menu dropdown-menu-sm dropdown-menu-right panel-default">
                                <ul class="head-list">


                                    <li>
                                        <a href="/logout"><i class="pli-unlock icon-lg icon-fw"></i> 注销</a>
                                    </li>
                                </ul>
                            </div>
                        </li>


                    </ul>
                </div>

            </div>
        </header>

        <div class="boxed">

            <div id="content-container">
                <div id="page-head">

                    <div id="page-title">
                        {% block page-title %}{% endblock %}
                    </div>


                        </div>

                <div id="page-content">
					<hr class="new-section-sm bord-no">
					<div class="row">
					    <div class="col-lg-20">
					        <div class="panel panel-body">
					            <div class="panel-body">
					
					                {% block content %}{% endblock %}
					            </div>
					        </div>
					    </div>
					</div>

                </div>

            </div>

            <nav id="mainnav-container">
                <div id="mainnav">

                    <div id="mainnav-menu-wrap">
                        <div class="nano">
                            <div class="nano-content">

                                <div id="mainnav-profile" class="mainnav-profile">
                                    <div class="profile-wrap text-center">
                                        <div class="pad-btm">
                                            <img class="/static/img-circle img-md" src="/static/img/logo.jpg" alt="Log Picture">
                                        </div>
                                        <a href="#profile-nav" class="box-block" data-toggle="collapse" aria-expanded="false">
                                            <span class="pull-right dropdown-toggle">
                                                <i class="dropdown-caret"></i>
                                            </span>
                                            <p class="mnp-name">{{ request.user }}</p>
                                            <span class="mnp-desc">{{ request.user.name }}</span>

                                        </a>
                                    </div>
                                    <div id="profile-nav" class="collapse list-group bg-trans">

                                        <a href="/logout/" class="list-group-item">
                                            <i class="pli-unlock icon-lg icon-fw"></i> 注销
                                        </a>
                                    </div>
                                </div>


                                <ul id="mainnav-menu" class="list-group">

						            <li class="list-header">Link List</li>

                                    {% if request.path == '/' %}
						                <li class="active-link">
                                    {% else %}
                                        <li>
                                    {% endif %}
						                <a href="/">
						                    <i class="ti-bar-chart"></i>
						                    <span class="menu-title">资产总览</span>
                                            <span class="pull-right badge badge-purple ">{{ MemberCount }}</span>
						                </a>
						            </li>
                                    {% if request.path_info in asset_url %}
                                    <li class="active-link" >
                                    {% else %}
                                    <li>
                                    {% endif %}
						                <a href="#" aria-expanded="false">
						                    <i class="ti-harddrive"></i>
						                    <span class="menu-title">
												资产管理
											</span>
						                </a>

						            {% if request.path_info in asset_url %}
                                    <ul class="collapse in" aria-expanded="true" >
                                    {% else %}
                                    <ul class="collapse" aria-expanded="false" style="height: 0px;">
                                    {% endif %}
                                        {% if request.path_info == '/asset/' %}
                                        <li class="active-link"><a href="/asset/" >固定资产<span class="pull-right badge badge-purple">{{ asset_count }}</span></a></li>
                                        {% else %}
                                        <li ><a href="/asset/" >固定资产<span class="pull-right badge badge-purple">{{ asset_count }}</span></a></li>
                                        {% endif %}
                                        {% if request.path_info == '/new_asset/' %}
                                        <li class="active-link"><a href="/new_asset/" >未入库资产<span class="pull-right badge badge-purple">{{ new_asset_count }}</span></a></li>
                                        {% else %}
                                        <li ><a href="/new_asset/" >未入库资产<span class="pull-right badge badge-purple">{{ new_asset_count }}</span></a></li>
                                        {% endif %}
                                        {% if request.path_info == '/discard_asset/' %}
                                        <li class="active-link"><a href="/discard_asset/" >黑名单资产<span class="pull-right badge badge-purple">{{ discard_asset_count }}</span></a></li>
                                        {% else %}
                                        <li ><a href="/discard_asset/" >黑名单资产<span class="pull-right badge badge-purple">{{ discard_asset_count }}</span></a></li>
                                        {% endif %}

                                    </ul>
						            </li>
                                    {% if request.path_info == '/audit_log/' %}
                                    <li class="active-link">
                                    {% else %}
                                    <li>
                                    {% endif %}
						                <a href="/audit_log/">
						                    <i class="ti-zoom-in"></i>
						                    <span class="menu-title">
												日志管理
											</span>
						                </a>
						            </li>
                                    {% if request.path_info == '/notepad/' %}
                                    <li class="active-link">
                                    {% else %}
                                    <li>
                                    {% endif %}

						                <a  href="/notepad/">
						                    <i class="ti-pencil-alt2"></i>
						                    <span class="menu-title">
												备 忘 录
											</span>
						                </a>
						            </li>
                                        <li id="backend_menu">
						                <a href="#" aria-expanded="false" >
						                    <i class="ti-flickr-alt"></i>
						                    <span class="menu-title">
												后台管理
											</span>
						                </a>

						                <ul class="collapse" aria-expanded="false" style="height: 0px;">

                                            <li ><a href="/idc_mgr/" onclick="parent_show(this)">机房管理</a></li>
                                            <li><a href="/tag_mgr/" onclick="parent_show(this)">标签管理</a></li>
                                            <li><a href="/business_mgr" onclick="parent_show(this)">业务线管理</a></li>
                                            <li><a href="/admin/" target="_blank">数据库管理</a></li>
                                            <li><a href="/admin/web/userprofile/" target="_blank">用户管理</a></li>
                                            <li><a href="http://www.feixiangwl.cn" target="_blank">关于我们</a></li>
						                </ul>
						              </li>


                                </ul>

                                <div class="mainnav-widget">


                                    <div class="show-small">
                                        <a href="#" data-toggle="menu-widget" data-target="#wg-server">
                                            <i class="pli-monitor-2"></i>
                                        </a>
                                    </div>

                                </div>


                            </div>
                        </div>
                    </div>

                </div>
            </nav>

            <aside id="aside-container">
                <div id="aside">
                    {% block help_box %}{% endblock %}
                </div>
            </aside>


        </div>

        <footer id="footer">

           {% block footer %}{% endblock %}
        </footer>




        <button class="scroll-top btn">
            <i class="pci-chevron chevron-up"></i>
        </button>

    </div>


{% block js %}{% endblock %}
{% block diyjs %}{% endblock %}
<script>
    window.onload=function(){
       var current_url= window.location.pathname;
       if (current_url == '/idc_mgr/'){
           $('#backend_menu').addClass('active');
           var text='a[href='+'"'+current_url+'"'+']';
           $(text).parent().addClass('active-link')
       }
       if (current_url == '/tag_mgr/'){
           var text='a[href='+'"'+current_url+'"'+']';
           $('#backend_menu').addClass('active');
           $(text).parent().addClass('active-link');

       }
       if (current_url == '/business_mgr/'){
           var text='a[href='+'"'+current_url+'"'+']';
           $('#backend_menu').addClass('active');
           $(text).parent().addClass('active-link');

       }
    };

</script>
</body>
</html>
